package com.jy.unkown;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DateUtil {

    public static final String PARAMETER = "";

    public static String getDate(int time) {
        int minute = 60;
        int onehour = 3600;
        int hour = time / onehour;
        int shengyuMinute = (time % onehour) / minute;
        int shengyuSecond = (time % onehour) % minute;
        StringBuffer stringBuffer = new StringBuffer();
        if (hour != 0) {
            if (hour >= 10) {
                stringBuffer.append(hour).append(":");
            } else {
                stringBuffer.append("0").append(hour).append(":");
            }
        }
        if (shengyuMinute == 0) {
            stringBuffer.append("00").append(":");
        } else {
            if (shengyuMinute >= 10) {
                stringBuffer.append(shengyuMinute).append(":");
            } else {
                stringBuffer.append("0").append(shengyuMinute).append(":");
            }
        }

        if (shengyuSecond >= 10) {
            stringBuffer.append(shengyuSecond);
        } else {
            stringBuffer.append("0").append(shengyuSecond);
        }
        return stringBuffer.toString();
    }

    public static void main(String[] args) {
//        for (int i = 0; i < 1000; i++) {
//            try {
//                Thread.sleep(1000);
//            } catch (InterruptedException e) {
//                e.printStackTrace();
//            }
//            String ss = getDate(i);
//            System.err.println(ss);
//
//        }

        float yuan= 600*1f/10000;
        String mm= String.format("%.2f",yuan);
        if (mm.endsWith("0")){
            mm= String.format("%.1f",yuan);

        }
        System.err.println(mm);



    }
}
